package com.dmlll.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dmlll.VO.HospitalPurchaseInputVO;
import com.dmlll.VO.PurchaseDrugDetailVO;
import com.dmlll.domain.DrugMessage;
import com.dmlll.domain.HospitalPurchaseInput;
import com.dmlll.domain.Purchase;
import com.dmlll.domain.PurchaseDrupDetail;
import com.dmlll.mapper.PurchaseDrupDetailMapper;
import com.dmlll.service.PurchaseDrupDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 采购单药品明细 服务实现类
 * </p>
 *
 * @author dmLll
 * @since 2021-03-31
 */
@Service
public class PurchaseDrupDetailServiceImpl extends ServiceImpl<PurchaseDrupDetailMapper, PurchaseDrupDetail> implements PurchaseDrupDetailService {

    @Override
    public List<PurchaseDrupDetail> getDetailAndDrug(Integer purchaseId) {
        return getBaseMapper().getDetailAndDrug(purchaseId);
    }

    /**
     * 根据供应单、药品信息、供应商id模糊查询
     * @param purchase
     * @param drugMessage
     * @param providerId
     * @return
     */
    @Override
    public IPage<PurchaseDrupDetail> getAvaPurchaseDrupDetail(IPage<PurchaseDrupDetail> iPage,PurchaseDrupDetail purchaseDrupDetail, Purchase purchase, DrugMessage drugMessage, Integer providerId, HospitalPurchaseInputVO input) {
        return getBaseMapper().getAvaPurchaseDrupDetail(iPage,purchaseDrupDetail,purchase,drugMessage,providerId,input);
    }
}
